package com.trickytriad.events.ui
{
	import flash.events.Event;

	/**
	 * ChangeMainViewEvent class.  Handles requests for the main view to be changed.
	 */
	public class ChangeMainViewEvent extends Event
	{
		
		// Event types
		public static const CHANGEMAINVIEW_REQUEST:String = "changeMainViewRequest";
		public static const CHANGEMAINVIEW_DONE:String = "changeMainViewDone";
		
		// View constants
		public static const MAINVIEW_MAINMENU:uint = 0;
		public static const MAINVIEW_GAMELIST:uint = 1;
		public static const MAINVIEW_CARDSTORE:uint = 2;				
		
		// The view to switch to
		public var newView:uint;
		
		// Optional variables needed for different types of views.
		
		// for MAINVIEW_GAMELIST 
		public var gameList:Array;	
		
		/**
		 * Makes a new event of this type.
		 * @param type Event type
		 * @param view One of the view "enums" at the top
		 */
		public function ChangeMainViewEvent(type:String, view:uint)
		{
			super(type, false, false);
			newView = view;
		}
		
	}
}